import type { CouponType } from '@/helpers/constants/coupon'
import type { ListData } from '.'

export type GoodsData = ListData<GoodsItem>
// 商品优惠
export interface GoodsDiscountItem {
  label: string
  value: string
}
// 商品
export interface GoodsItem {
  id: string
  goodsId: string
  cover: string
  name: string
  price: string
  vipPrice: string
  couponPrice: number
  commissionPrice: number
  discounts: GoodsDiscountItem[]
}
export interface GoodsDetail {
  imgs: string[]
  goodsId: string
  title: string
  price: string
  originalPrice: number
  couponPrice: number
  commissionPrice: number
  coupons: CouponItem[]
  discounts: GoodsDiscountItem[]
}
export type OrderData = ListData<OrderItem>
// 订单
export interface OrderItem {
  id: string
  cover: string
  name: string
  number: number
  discounts: string[]
  price: number
  vipPrice: number
  orderTime: string
}
// 购物金记录项
export interface OrderRecordItem {
  id: string
  orderTime: number
  date: string
  day: string
  action: string
  actionDetail: string
  actionColor: string
  actionAmount: string
  balance: string
  userId: string
}
export type RecordData = ListData<RecordItem>
// 购物金记录
export interface RecordItem {
  id: string
  date: string
  list: OrderRecordItem[]
}
// 券
export interface CouponItem {
  type: CouponType
  amount: string
  title: string
  btnText: string
}

export interface JumpDiscountItem {
  icon: string
  text: string
  amount: string
}
